Skip to content

Conversation

@dominikg
Copy link
Member

@dominikg dominikg commented Dec 4, 2022

to allow prebundling for libraries using them

see https://discord.com/channels/457912077277855764/1024975960564580383

note that optimizeDeps.exclude automatically excludes subpaths too, implementation in vite looks like this:
i === exclude || i.startsWith(exclude+'/')

cc @bluwy @babichjacob

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

@changeset-bot
Copy link

changeset-bot bot commented Dec 4, 2022

🦋 Changeset detected

Latest commit: b5cd01d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dominikg dominikg changed the title fix: add and to optimizeDeps.exclude fix: add $app and $env to optimizeDeps.exclude Dec 4, 2022
@dominikg
Copy link
Member Author

dominikg commented Dec 4, 2022

this PR may improve the situation for vitest unit tests using $app or $env too

@dummdidumm
Copy link
Member

It doesn't fix #6259, but I think this solves #1485 (not completely but) for people who want to consume libraries using SvelteKit-specific stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants